<?php 

 require_once("../lib/php_connect.php");
 require_once("../lib/fonctions_requete_sql.php");
 require_once("../lib/tableau_association.php");
$connexion = new PDO('mysql:host='.$PARAM_hote.';dbname='.$PARAM_nom_bd, $PARAM_utilisateur, $PARAM_mot_passe,array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
//$id=$_POST["id"];
$id=9;

$sql="SELECT * FROM prospect INNER JOIN etablissement ON etablissement.id_etablissement=prospect.id_etablissement 
							INNER JOIN adresse ON adresse.id_adresse=etablissement.id_adresse
							INNER JOIN coordonnee ON etablissement.id_coordonnee=coordonnee.id_coordonnee
							INNER JOIN ville ON adresse.id_ville= ville.id_ville WHERE id_prospect=$id";
$query = $connexion->query($sql);


/*récupération des informations de base de l'usager*/
foreach($query as $row){
	echo "<prospect>";
	$id_etab_facturation = $row['id_etablissement_facturation'];
	$id_prospect = $row['id_prospect'];
	foreach($tab_correspondance_prospect as $key=>$value)
		echo '<'.$key.">".$row[$value]."</".$key.">";
}
?>